using System;
using System.Diagnostics;

using Atomic.Libraries.Mathematics;
using Atomic.Structures;

namespace Atomic.Clusters
{
	[Serializable]
	[DebuggerDisplay("{DebuggerDisplay}")]
	public class ClusterPoint
	{
		public ClusterPoint(Site site, SpaceVector position, ClusterFunctionFactor clusterFunction)
		{
			LatticeSite = site;
			Position = position;
			ClusterFunction = clusterFunction;
		}

		public override string ToString()
		{
			return Position.ToString();
		}

		/// <summary>
		/// The factor of the cluster function corresponding to this point.
		/// </summary>
		public ClusterFunctionFactor ClusterFunction
		{
			get;
			private set;
		}

		/// <summary>
		/// Site in the lattice (or the expanded lattice).
		/// </summary>
		public Site LatticeSite
		{
			get;
			private set;
		}

		/// <summary>
		/// Cluster point position relative to the basis of the lattice.
		/// </summary>
		public SpaceVector Position
		{
			get;
			private set;
		}

		private string DebuggerDisplay
		{
			get
			{
				return ToString();
			}
		}
	}
}
